import request from "../until/request";
// 查询考核列表
export const getBackLog = (data) => request("/workTask/selectWorkTaskCount", "POST", data);

// 查询 已发起考核
export const launchCheck = (data) => request("/pmForm/selectPmFormByPage", "POST", data);
// 查询 所有阶段的数据
export const allCheck = (data) => request("/pmStage/selectStageAndUserCount", "POST", data);

// 考核管理详情
export const getCheckDetail = (data) => request("/pm/selectPmByPage", "POST", data);
// 根据pmId查询绩效信息
export const selectMyPmById = (data) => request("/pm/selectMyPmById", "POST", data)
// 绩效详情-查询绩效流程
export const getPerformProcess = (data) => request("/pmProgress/selectPmProgress", "POST", data);
// 绩效详情-查询绩效数据
export const getPerformData = (data) => request("/pm/selectPmData", "POST", data);
// 绩效详情-查询绩效日志
export const getPerformLog = (data) => request("/pmLog/selectPmLogByPmId", "POST", data);
// 查询考核周期表
export const getCheckForm = (data) => request("/pmPeriod/selectPmPeriod", "POST", data);
// 驳回流程数据
export const getDismiss = (data) => request("/pmProgress/selectRebutProgress", "POST", data);
// 确定驳回
export const confrimDismiss = (data) => request("/pmProgress/rebutPmProgress", "POST", data);
// 查询考评表
export const getRouteForm = (data) => request("/pmGroup/selectPmGroupByPmPeriodCode", "POST", data);
// 发起考核
export const launchOpen = (data) => request("/pmForm/startPmForm", "POST", data, true);
// 分页查询考评表
export const getPageRouteForm = (data) => request("/pmForm/selectPmFormByPage", "POST", data);
// 分页查询考评组
export const getRouteGroup = (data) => request("/pmGroup/selectPmGroupByPage", "POST", data);
// 获取考评员工
export const getPmFormUser = (data) => request("/pmForm/selectPmFormUser", "POST", data);
// 获取指标库数据
export const getIndexList = (data) => request("/targetLib/selectTargetLibByPage", "POST", data);
// 获取指标库类型列表
export const getTargetTypeList = (data) => request("/type/selectDictItemByCode", "POST", data)
// 发起考核
export const startPmForm = (data) => request("/pmForm/startPmForm", "POST", data)
// 发起评分
export const startScore = (data) => request("/pmForm/startScore", "POST", data)


// 步骤一----------目标制定
export const getSubmitPm = (data) => request("/pm/submitPm", "POST", data, false)


// 步骤二  目标确认
// export const targetAffirm = (data)=>request("")





// 请求步骤按钮的用户权限
export const getUserBtnAuthority = (data) => request("/btnConf/select", "POST", data);


// 获取所有员工信息
export const getStaffInfoApi = () => request("/employee/selectAllEmployee", "POST")

// 步骤二 --转交
export const careOfApi = (data) => request("/pmProgress/anonymousPmProgress", "POST", data)

// 自我评分
export const selfScoreApi = (data) => request("/pm/submitPm", "POST", data)









/* 部门绩效 */
// 查询部门列表
export const getDeptListApi = (data) => {
  return request(`/dept/selectManagerDept?userDDId=${data.userDDId}`, "POST", {})
}


// 查询部门员工列表
export const getDepteStaffApi = (data) => request("/dept/selectPageManagerUser", "POST", data)

// 查询员工绩效列表
export const getStaffPerformanceListApi = (data) => request(`/pm/selectMyPm?userDDId=${data.userDDId}`)











/* 任务列表 */
// 查询待办任务
export const getNoneFinish = (data) => request("/workTask/selectNotHanderWork", "POST", data);
// 查询已办任务
export const getFinishWork = (data) => request("/workTask/selectHanderWork", "POST", data);

// 查询考核列表数量
export const getWorkTaskCount = (data) => request("/workTask/selectWorkTaskCount", "POST", data);

// 分页查询待办任务
export const getNotHanderWorkByPage = (data) => request("/workTask/selectNotHanderWorkByPage", "POST", data)

// 分页查询已办任务
export const getHanderWorkByPage = (data) => request("/workTask/selectHanderWorkByPage", "POST", data)




